<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script>
        'use strict'
        let user = {
            name: "xiaofan",
            age: 3,
            set: '男'
        }
        // 对象转化为json字符串
        let jsonUser = JSON.stringify(user);
        // Json字符串转换成对象
        let userBean = JSON.parse('{"name":"xiaofaner","age":28,"set":"男"}');

    </script>
</head>
<body>

</body>
</html>